package com.yunxi.model.otd;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.util.StringUtils;

/**
 * <p>
 * 生产计划
 * </p>
 *
 * @author XUQI
 * @since 2019-05-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("pms_otd_week_plan_single")
@ApiModel(value = "OtdWeekPlanSingle对象", description = "周单车")
public class OtdWeekPlanSingle implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "周单车ID")
    @TableId(value = "WEEK_PLAN_SINGLE_ID", type = IdType.UUID)
    private String weekPlanSingleId;

    @ApiModelProperty(value = "周生产需求明细CODE")
    @TableField("WEEK_PLAN_DETAIL_CODE")
    private String weekPlanDetailCode;

    @ApiModelProperty(value = "周度计划CODE")
    @TableField("WEEK_PLAN_CODE")
    private String weekPlanCode;

    @ApiModelProperty(value = "产品编码")
    @TableField("PRODUCT_CODE")
    private String productCode;

    @ApiModelProperty(value = "选装包")
    @TableField("CUSTOM_PACK_CODE")
    private String customPackCode;

    @ApiModelProperty(value = "客户订单号")
    @TableField("CUS_ORDER_NO")
    private String cusOrderNo;

    @ApiModelProperty(value = "优先级")
    @TableField("PRIORITY_LEVEL")
    private String priorityLevel;

    @ApiModelProperty(value = "创建人")
    @TableField(value = "CREATE_BY",fill = FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    @TableField(value="CREATE_DATE",fill = FieldFill.INSERT)
    private Date createDate;

    @ApiModelProperty(value = "最后修改人")
    @TableField(value="UPDATE_BY",fill = FieldFill.UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "最后修改时间")
    @TableField(value="UPDATE_DATE",fill = FieldFill.UPDATE)
    private Date updateDate;

    @ApiModelProperty(value = "版本号")
    @TableField("VERSION")
    private Integer version = 0;

    @ApiModelProperty(value = "接口传送标识")
    @TableField("IS_SEND")
    private Integer isSend = 0;

    @ApiModelProperty(value = "是否删除")
    @TableField("IS_DEL")
    private Integer isDel = 0;

    public void setCustomPackCode(String customPackCode) {
        this.customPackCode = StringUtils.isEmpty(customPackCode) ? null : customPackCode;
    }

}
